﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="User.aspx.cs" Inherits="Xiangmu.User" %>
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %><%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" tagprefix="webdiyer" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="renderer" content="webkit">
    <title>用户管理</title>
    <link href="css/bootstrap.min.css?v=3.4.0" rel="stylesheet">
    <link href="font-awesome/css/font-awesome.css?v=4.3.0" rel="stylesheet">
    <!-- Morris -->
    <link href="css/plugins/morris/morris-0.4.3.min.css" rel="stylesheet">

    <link href="css/animate.css" rel="stylesheet">
    <link href="css/style.css?v=2.2.0" rel="stylesheet">
    <script src="js/jquery-2.1.1.min.js" type="text/javascript"></script>
<script type="text/javascript" language="JavaScript">
    $(function () {
        $(".stripe_tb tr").mouseover(function () { //如果鼠标移到class为stripe_tb的表格的tr上时，执行函数
            $(this).addClass("over");
        }).mouseout(function () { //给这行添加class值为over，并且当鼠标一出该行时执行函数
            $(this).removeClass("over");
        }) //移除该行的class
        $(".stripe_tb tr:even").addClass("alt"); //给class为stripe_tb的表格的偶数行添加class值为alt
    });


    //实现全选的函数
    //根据传入的checkbox的选中状态设置所有checkbox的选中状态
    function selectAll(obj)
    {
        var allInput = document.getElementsByTagName("input");
        //alert(allInput.length);
        var loopTime = allInput.length;
        for(i = 0;i < loopTime;i++)
        {
            //alert(allInput[i].type);
            if(allInput[i].type == "checkbox")
            {
                allInput[i].checked = obj.checked;
            }
        }
    }
    //批量删除
//    function judgeSelect() {
//        var result = false;
//        var allInput = document.getElementsByTagName("input");
//        var loopTime = allInput.length;
//        for (i = 0; i < loopTime; i++) {
//            if (allInput[i].checked) {
//                result = true;
//                break;
//            }
//        }
//        if (!result) {
//            alert("请先选则要删除的记录！");
//            return result;
//        }
//        result = confirm("你确认要删除选定的多条记录吗！？");
//        return result;
//    }
    //按下批量删除后要处理的代码！
    function delIt() {
        var cbxBool = 0;
        for (var i = 0; i < cbxArray.length; i++) {
            var obj = document.getElementById(cbxArray[i]);
            if (obj.checked == true) {
                cbxBool = 1;
                break;
            }
        }

        if (cbxBool == 1) {
            var result = confirm("操作不可以恢复，确定当前操作吗？");
            if (result) {
                return true;
            }
        } else {
            alert("您还没有选中项");
            return false;
        }
        return false;

    }





</script>
<style type="text/css"> /*注意选择器的层叠关系*/
.stripe_tb tr.alt td {
	background: #ecf6fc
}  /*这行将给所有偶数行加上背景色*/
.stripe_tb tr.over td {
	background: #FEF3D1
} /*这个将是鼠标高亮行的背景色*/
</style>
</head>
<body>
    <form id="form1" runat="server">
    <div id="wrapper">
        <nav class="navbar-default navbar-static-side" role="navigation">
            <div class="sidebar-collapse">
                <ul class="nav" id="side-menu">
                    <li class="nav-header">

                        <div class="dropdown profile-element"> <span>
                            <img alt="image" class="img-circle" src="img/profile_small.jpg" />
                             </span>
                            <a data-toggle="dropdown" class="dropdown-toggle" href="Index.aspx#">
                                <span class="clear"> <span class="block m-t-xs"> <strong class="font-bold">Beaut-ly</strong>
                             </span>  <span class="text-muted text-xs block">超级管理员 <b class="caret"></b></span> </span>
                            </a>
                            <ul class="dropdown-menu animated fadeInRight m-t-xs">
                                <li><a href="Login.aspx">安全退出</a>
                                </li>
                            </ul>
                        </div>

                    </li>
                      <li >
                        <a href="Index.aspx"><span class="nav-label">主页</span></a>
                    </li>
                    <li>
                        <a href="User.aspx"><span class="nav-label">用户管理</span></a>
                    </li>                    
                    <li>
                        <a href="index.html#"> <span class="nav-label">新闻管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a href="addnews.aspx">添加新闻</a>
                            </li>
                            <li><a href="newsManager.aspx">管理新闻</a>
                            </li>

                        </ul>
                    </li>
                    <li>
                        <a href="workManager.aspx"> <span class="nav-label">作品管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a href="addWork.aspx">发布作品</a>
                            </li>
                            <li><a href="workManager.aspx">管理作品</a>
                            </li>
                        </ul>
                    </li>
                    <li>
                        <a href="activityManager.aspx"><span class="nav-label">活动管理</span><span class="fa arrow"></span></a>
                        <ul class="nav nav-second-level">
                            <li><a href="addManager.aspx">添加新活动</a>
                            </li>
                            <li><a href="activityManager.aspx">编辑活动</a>
                            </li>
                        </ul>
                   </li>
               </ul>
            </div>
        </nav>

        <div id="page-wrapper" class="gray-bg">
            <div class="row border-bottom">
                <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
                    <div class="navbar-header">
                        <a class="navbar-minimalize minimalize-styl-2 btn btn-primary " href="#"><i class="fa fa-bars"></i> </a>
                        <form role="search" class="navbar-form-custom" method="post" action="search_results.html">
                            <div class="form-group">
                                 <input type="text" placeholder="输入需查找的用户名 …" class="form-control" name="topsearch" id="search" runat="server">                    	         
                                 <asp:Button ID="btnselect" runat="server" Text="查找" 
                                     CssClass="btn btn-w-m btn-success" onclick="btnselect_Click"></asp:Button>
                            </div>
                        </form>
                    </div>
                    <ul class="nav navbar-top-links navbar-right">
                        <li>
                            <asp:Button ID="btnnew" runat="server" Text="新建用户" CssClass="btn btn-w-m btn-success" onclick="btnnew_Click"></asp:Button>
                            <span class="m-r-sm text-muted welcome-message"><a href="#" title="返回首页"></a>欢迎来到后台主页</span>
                        </li>
                        <li class="dropdown">
                         
                            <ul class="dropdown-menu dropdown-messages">

                                <li class="divider"></li>
   
                                <li class="divider"></li>
                    
                            </ul>
                        </li>
                        <li class="dropdown">
                           
                            <ul class="dropdown-menu dropdown-alerts">
                           
                               
                            </ul>
                        </li>


                        <li>
                            <a href="Login.aspx">
                                <i class="fa fa-sign-out"></i> 退出
                            </a>
                        </li>
                    </ul>

                </nav>
            </div>
            <div class="row wrapper border-bottom white-bg page-heading">
                <div class="col-lg-10">
                    <h2>用户管理</h2>

                </div>
<%--                <div class="col-lg-2">
                </div>--%>
                  <div>
                <asp:Repeater ID="rptUser" runat="server" onprerender="rptNews_PreRender">
                <HeaderTemplate>
                    <table class="stripe_tb" border="1" width="60%" cellpadding="0" cellspacing="0">
                        <thead>
                            <tr class="nav_table">
                                <td bgcolor="#F5FAFE">选择框</td>
                                <td bgcolor="#F5FAFE">用户名</td>
                                <td bgcolor="#F5FAFE">密码</td>
                                <td bgcolor="#F5FAFE">角色</td>
                                <td bgcolor="#F5FAFE">QQ</td>
                                <td bgcolor="#F5FAFE">E-mail</td> 
                                <td bgcolor="#F5FAFE">操作</td>
                            </tr>
                        </thead>
                        <tbody>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr>
                        <td bgcolor="#ffffff">
                            <asp:CheckBox ID="chbqian" runat="server" /></td>
                        <td bgcolor="#ffffff">
                            <asp:Label ID="lblid" runat="server" Text='<%#Eval("UserName")%>'></asp:Label></td>
                        <td bgcolor="#ffffff"><%#Eval("Pasword")%></td>
                        <td bgcolor="#ffffff"><%#Eval("Type")%></td>
                        <td bgcolor="#ffffff"><%#Eval("QQ")%></td>
                        <td bgcolor="#ffffff"><%#Eval("Email")%></td>
                        <td><a href="editUser.aspx?UserName=<%#Eval("UserName")%>">编辑</a>
                         <asp:LinkButton ID="lbDelete" OnCommand="lbDelete_Command" CommandName='<%#Eval("UserName") %>'
                          runat="server" OnClientClick="return confirm('您确定要删除该记录吗?')">删除</asp:LinkButton></td>
                        </tr>
                </ItemTemplate>
                <FooterTemplate>
                    </tbody>

                        </table>
                </FooterTemplate>

                        </asp:Repeater>

<%--        <asp:Repeater ID="rptUser" runat="server">
        <HeaderTemplate>
            <table width="14%" a
        </HeaderTemplate>
        <ItemTemplate>
        </ItemTemplate>
        <FooterTemplate>
        </FooterTemplate>
        </asp:Repeater>--%>
             <Webdiyer:AspNetPager ID="AspNetPager1" runat="server" AlwaysShow="true" PageSize="10" ShowPageIndexBox="Always" SubmitButtonText="前往" TextAfterPageIndexBox="页" TextBeforePageIndexBox="转到" Width="100%">
         </Webdiyer:AspNetPager>
                     <table align="center" bgcolor="yellow">
                        <tr>
                            <td>
                                <asp:CheckBox ID="check_allselect" runat="server" Text="全选" onclick="selectAll(this)" />
                            </td>
                            <td> 
                                <asp:LinkButton ID="lbDelete_select"
                                runat="server"
                                    onclick="lbDelete_select_Click" OnClientClick="return delIt()">批量删除 </asp:LinkButton>
                                <asp:Label ID="lblmsg" runat="server" Text="Label"></asp:Label>
                            </td>

                        </tr>
                     </table>
    </div>

             </div>


 
            <div class="footer">
                <div class="pull-right">
                    By：ly
                </div>
                <div>
                    <strong>Copyright</strong> ly&copy; 2019
                </div>
            </div>

        </div>
    </div>

    <!-- Mainly scripts -->
    <script src="js/jquery-2.1.1.min.js"></script>
    <script src="js/bootstrap.min.js?v=3.4.0"></script>
    <script src="js/plugins/metisMenu/jquery.metisMenu.js"></script>
    <script src="js/plugins/slimscroll/jquery.slimscroll.min.js"></script>

    <!-- Flot -->
    <script src="js/plugins/flot/jquery.flot.js"></script>
    <script src="js/plugins/flot/jquery.flot.tooltip.min.js"></script>
    <script src="js/plugins/flot/jquery.flot.spline.js"></script>
    <script src="js/plugins/flot/jquery.flot.resize.js"></script>
    <script src="js/plugins/flot/jquery.flot.pie.js"></script>
    <script src="js/plugins/flot/jquery.flot.symbol.js"></script>
    <script src="js/plugins/flot/curvedLines.js"></script>

    <!-- Peity -->
    <script src="js/plugins/peity/jquery.peity.min.js"></script>
    <script src="js/demo/peity-demo.js"></script>

    <!-- Custom and plugin javascript -->
    <script src="js/hplus.js?v=2.2.0"></script>
    <script src="js/plugins/pace/pace.min.js"></script>

    <!-- jQuery UI -->
    <script src="js/plugins/jquery-ui/jquery-ui.min.js"></script>

    <!-- Jvectormap -->
    <script src="js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js"></script>
    <script src="js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js"></script>

    <!-- EayPIE -->
    <script src="js/plugins/easypiechart/jquery.easypiechart.js"></script>

    <!-- Sparkline -->
    <script src="js/plugins/sparkline/jquery.sparkline.min.js"></script>

    <!-- Sparkline demo data  -->
    <script src="js/demo/sparkline-demo.js"></script>

    <script>
        $(document).ready(function () {
            $('.chart').easyPieChart({
                barColor: '#f8ac59',
                //                scaleColor: false,
                scaleLength: 5,
                lineWidth: 4,
                size: 80
            });

            $('.chart2').easyPieChart({
                barColor: '#1c84c6',
                //                scaleColor: false,
                scaleLength: 5,
                lineWidth: 4,
                size: 80
            });

            var d1 = [
                [1262304000000, 1],
                [1264982400000, 100],
                [1267401600000, 1],
                [1270080000000, 200],
                [1272672000000, 1],
                [1275350400000, 100],
                [1277942400000, 1],
                [1280620800000, 300]
            ];
            var d2 = [
                [1262304000000, 100],
                [1264982400000, 1],
                [1267401600000, 150],
                [1270080000000, 1],
                [1272672000000, 230],
                [1275350400000, 1],
                [1277942400000, 150],
                [1280620800000, 10]
            ];

            var data3 = [
                {
                    label: "Data 1",
                    data: d1,
                    color: '#23c6c8'
                },
                {
                    label: "Data 2",
                    data: d2,
                    color: '#1ab394'
                }
            ];
            $.plot($("#flot-chart3"), data3, {
                xaxis: {
                    tickDecimals: 0
                },
                series: {
                    lines: {
                        show: true,
                        fill: true,
                        fillColor: {
                            colors: [{
                                opacity: 1
                            }, {
                                opacity: 1
                            }]
                        },
                    },
                    curvedLines: {
                        active: true,
                        fit: true,
                        apply: true
                    },
                    points: {
                        width: 0.1,
                        show: false
                    },
                },
                grid: {
                    show: false,
                    borderWidth: 0
                },
                legend: {
                    show: false,
                }
            });


            var mapData = {
                "US": 298,
                "SA": 200,
                "DE": 220,
                "FR": 540,
                "CN": 120,
                "AU": 760,
                "BR": 550,
                "IN": 200,
                "GB": 120,
            };

            $('#world-map').vectorMap({
                map: 'world_mill_en',
                backgroundColor: "transparent",
                regionStyle: {
                    initial: {
                        fill: '#e4e4e4',
                        "fill-opacity": 0.9,
                        stroke: 'none',
                        "stroke-width": 0,
                        "stroke-opacity": 0
                    }
                },

                series: {
                    regions: [{
                        values: mapData,
                        scale: ["#1ab394", "#22d6b1"],
                        normalizeFunction: 'polynomial'
                    }]
                },
            });
        });
    </script>

    </form>
</body>
</html>
